package han.chensing.latos.maker.windows.widget.line;

import com.badlogic.gdx.graphics.g2d.Batch;

import java.util.ArrayList;

import han.chensing.latos.common.level.content.objects.CommonLine;
import han.chensing.latos.common.level.util.MathUtil;
import han.chensing.latos.maker.V;
import han.chensing.latos.maker.windows.widget.simulator.LatosSimulatorWidget;

public class SingleLineSimulatorWidget extends LatosSimulatorWidget {

    int currentLineIndex=0;
    boolean showAllLines=false;

    @Override
    protected void drawLines(Batch batch) {
        ArrayList<CommonLine> lineObjects = V.project.getLevelData().getLineObjects();
        if (!MathUtil.isInRange(0,currentLineIndex,lineObjects.size()-1))return;
        drawALineInCurrentFrame(batch, lineObjects.get(currentLineIndex));
    }

    public void setCurrentLineIndex(int currentLineIndex) {
        this.currentLineIndex = currentLineIndex;
    }

    public void setShowAllLines(boolean showAllLines) {
        this.showAllLines = showAllLines;
    }
}
